<template>
  <div class="app-container">
    <el-form
      ref="detail"
      :model="formData"
      label-width="120px">
      <el-form-item label="查询时间：">
        {{ formData.created_at }}
      </el-form-item>
      <el-form-item label="姓名：">
        {{ formData.name }}
      </el-form-item>
      <el-form-item label="手机号码：">
        {{ formData.phone }}
      </el-form-item>
      <el-form-item
        label="身份证号码："
        v-if="showIdCard">
        {{ formData.id_card }}
      </el-form-item>
      <el-form-item label="查询状态：">
        {{ formData.message }}
      </el-form-item>
      <el-form-item label="是否扣费：">
        {{ formData.is_charge == 1 ? '扣费' : '不扣费' }}
      </el-form-item>
      <el-form-item label="结果信息：">
        <span v-if="formData.response.data">
          <div>{{ '认证结果：' + formData.response.data.msg }}</div>
        </span>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
  export default {
    name: 'detail',
    props: {
      formData: {
        type: Object,
        default: () => {
          return null;
        },
      },
      showIdCard: {
        // 是否展示身份证
        type: Boolean,
        default: true,
      },
    },
    data() {
      return {
        realOperatorOptions:[
          {
            value: 1,
            label: '移动'
          },
          {
            value: 2,
            label: '联通'
          },
          {
            value: 3,
            label: '电信'
          },
        ]
      };
    },
    methods: {
      handleSubmit() {
        this.$emit('update:visible', false);
      },
    },
  };
</script>
